Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[expo-sms] Adds Attachment Support To Add Images To SMS Messages #7967

Merged
merged 3 commits into from Apr 24, 2020

Conversation

thorbenprimke
Copy link
Contributor

Why

The Expo SMS package currently does not support image attachments.

How

Adds support for both iOS and Android to share an image attachment (png or jpeg) alongside the message.

Note: I would appreciate any feedback on this. If you are open to merging this in, I'll update the documentation as well.

Test Plan

Added tests to both iOS and Android test suite to validate the functionality.

iOS Android
Text Image from iOS Screenshot_1587636717
Text With Image Image from iOS (1) Screenshot_1587636660

@thorbenprimke thorbenprimke changed the title Adds Attachment Support To Add Images To SMS Messages [SMS] Adds Attachment Support To Add Images To SMS Messages Apr 23, 2020
@thorbenprimke thorbenprimke changed the title [SMS] Adds Attachment Support To Add Images To SMS Messages [expo-sms] Adds Attachment Support To Add Images To SMS Messages Apr 23, 2020
Copy link
Contributor

@bbarthec bbarthec left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍
Please add docs and let's make it mergeable! 😊

packages/expo-sms/src/__tests__/SMS-test.ts Outdated Show resolved Hide resolved
Comment on lines +38 to +45
remoteUri: 'https://upload.wikimedia.org/wikipedia/commons/2/2c/Rotating_earth_%28large%29.gif',
md5: '090592ebd01ac1e425b2766989040f80',
mimeType: 'image/gif',
};

const audioFile = {
localUri: FS.documentDirectory + 'sound.mp3',
remoteUri: 'https://dl.espressif.com/dl/audio/gs-16b-1c-44100hz.mp3',
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@EvanBacon @bbarthec - would one of y'all be able to upload these to the test-suite-data S3 bucket?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can change after merged

@thorbenprimke
Copy link
Contributor Author

Updated to wrap the attachments parameter in an options parameter.

Copy link
Contributor

@EvanBacon EvanBacon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work on this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants